package cn.homework.service.impl;

import cn.homework.dao.NoticeDao;
import cn.homework.dao.impl.NoticeDaoImpl;
import cn.homework.domain.Notice;
import cn.homework.service.NoticeService;

import java.util.List;
import java.util.Map;

/**
 * @author ACT
 */
public class NoticeServiceImpl implements NoticeService {
    private NoticeDao dao = new NoticeDaoImpl();

    @Override
    public List<Notice> findAllNotice() {
        return dao.findAllNotice();
    }

    @Override
    public void deleteNoticeById(String id) {
        dao.deleteNoticeById(id);
    }

    @Override
    public void addNotice(String message, String admin) {
        dao.addNotice(message, admin);
    }

    @Override
    public List<Notice> findNoticeByCondition(Map<String, String[]> map) {
        return dao.findNoticeByCondition(map);
    }
}
